/**
 * 
 */
package com.itboye.core.utils;

import android.content.Context;
import android.view.View;
import android.view.inputmethod.InputMethodManager;

/**
 * 显示隐藏键盘工具类
 * @author hebidu
 * 
 */
public class SoftwareUtil {
	public static void showOrHideSoftware(View view, Context context,
			boolean isShow) {
		InputMethodManager imm = (InputMethodManager) context
				.getSystemService(Context.INPUT_METHOD_SERVICE);
		if (isShow)
			imm.showSoftInput(view, InputMethodManager.SHOW_FORCED);
		else {
			imm.hideSoftInputFromWindow(view.getWindowToken(), 0); // 强制隐藏键盘
		}
	}
}
